package com.tjhk.java.tech.init;

import java.util.*;

public class Test {
    public static void main(String[] args) {
//        List<Integer> list = Arrays.asList(1,2,4,5,3);
//        list.add(6);
        List<Integer> list2 = new ArrayList<>(Arrays.asList(1,2,4,5,3));
        list2.add(6);
        Iterator<Integer> iterator= list2.iterator();
        while (iterator.hasNext()){
            System.out.println(iterator.next());
        }

    }
}
